package org.example.maven.museumuser.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.example.maven.museumuser.domain.entity.ActionTicket;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zafkiel
 * @since 2025-06-21
 */
@Mapper
public interface ActionTicketMapper extends BaseMapper<ActionTicket> {

    //进行活动可售出票数加1
    @Update("update action_ticket set ac_ticket_paid_number=ac_ticket_paid_number+1 where id=#{id} and ac_ticket_paid_number<ac_ticket_number")
    Integer updateActionTicket(Integer id);

}
